﻿<Window x:Class="Revsoft.Wabbitcode.MainWindow"
		xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
		xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
		xmlns:wc="clr-namespace:Revsoft.Wabbitcode"
		xmlns:wcs="clr-namespace:Revsoft.Wabbitcode.Services"
		xmlns:wcp="clr-namespace:Revsoft.Wabbitcode.Properties"
		xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
		TextOptions.TextFormattingMode="Display" UseLayoutRounding="True"
		mc:Ignorable="d" Title="Wabbitcode" Name="WabbitcodeMainWindow"
		Height="900" Width="1200" AllowDrop="True"
		Closed="Window_Closed" Initialized="Window_Initialized" DragDrop.DragEnter="Window_DragEnter">
	<Window.CommandBindings>
		<CommandBinding Command="New" Executed="NewFile_Executed" />
		<CommandBinding Command="wc:WabbitcodeCommands.NewProject" Executed="NewProject_Executed" />
		<CommandBinding Command="Open" Executed="OpenFile_Executed" />
		<CommandBinding Command="wc:WabbitcodeCommands.OpenProject" Executed="OpenProject_Executed" />
		<CommandBinding Command="Save" Executed="SaveFile_Executed" />
		<CommandBinding Command="wc:WabbitcodeCommands.SaveAll" Executed="SaveAll_Executed" />
		<CommandBinding Command="Cut" Executed="Cut_Executed" />
		<CommandBinding Command="Copy" Executed="Copy_Executed" />
		<CommandBinding Command="Paste" Executed="Paste_Executed" />
		<CommandBinding Command="SelectAll" Executed="SelectAll_Executed" />
		<CommandBinding Command="Undo" Executed="Undo_Executed" />
		<CommandBinding Command="Redo" Executed="Redo_Executed" />
		<CommandBinding Command="Close" Executed="Close_Executed" />
		<CommandBinding Command="wc:WabbitcodeCommands.Assemble" Executed="Assemble_Executed" />
		<CommandBinding Command="wc:WabbitcodeCommands.About" Executed="About_Executed" />
	</Window.CommandBindings>
	<Window.InputBindings>
		<KeyBinding Command="New" Key="N" Modifiers="Ctrl" />
		<KeyBinding Command="Open" Key="O" Modifiers="Ctrl" />
		<KeyBinding Command="wc:WabbitcodeCommands.NewProject" Key="N" Modifiers="Ctrl+Shift" />
		<KeyBinding Command="wc:WabbitcodeCommands.OpenProject" Key="O" Modifiers="Ctrl+Shift" />
		<KeyBinding Command="Save" Key="S" Modifiers="Ctrl" />
		<KeyBinding Command="Cut" Key="X" Modifiers="Ctrl" />
		<KeyBinding Command="Copy" Key="C" Modifiers="Ctrl" />
		<KeyBinding Command="Paste" Key="V" Modifiers="Ctrl" />
		<KeyBinding Command="SelectAll" Key="A" Modifiers="Ctrl" />
		<KeyBinding Command="Undo" Key="Z" Modifiers="Ctrl" />
		<KeyBinding Command="Redo" Key="Y" Modifiers="Ctrl" />
		<KeyBinding Command="Close" Key="W" Modifiers="Ctrl" />
		<KeyBinding Command="wc:WabbitcodeCommands.Assemble" Key="B" Modifiers="Ctrl+Shift" />
		<KeyBinding Command="wc:WabbitcodeCommands.Assemble" Key="F6" />
	</Window.InputBindings>
	<Window.Resources>
		<wcp:Settings x:Key="Settings" />
		<BooleanToVisibilityConverter x:Key="boolToVis" />
	</Window.Resources>

	<Grid Name="grid">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>
		<Menu>
			<MenuItem Header="File">
				<MenuItem Header="New">
					<MenuItem Header="File" Command="New" />
					<MenuItem Header="Project..." Command="wc:WabbitcodeCommands.NewProject" />
				</MenuItem>
				<MenuItem Header="Open">
					<MenuItem Header="File..." Command="Open"/>
					<MenuItem Header="Project..." Command="wc:WabbitcodeCommands.OpenProject"/>
				</MenuItem>
				<MenuItem Header="Save"/>
				<MenuItem Header="Save As..."/>
				<MenuItem Command="wc:WabbitcodeCommands.SaveAll"/>
				<MenuItem Header="Save Project"/>
				<MenuItem Header="Close"/>
				<Separator/>
				<MenuItem Header="Print"/>
				<MenuItem Header="Print Preview"/>
				<MenuItem Header="Page Setup"/>
				<Separator/>
				<MenuItem Header="Recent Files"/>
				<Separator/>
				<MenuItem Header="Exit"/>
			</MenuItem>
			<MenuItem Header="Edit">
				<MenuItem Command="Undo"/>
				<MenuItem Command="Redo"/>
				<Separator/>
				<MenuItem Command="Cut"/>
				<MenuItem Command="Copy"/>
				<MenuItem Command="Paste"/>
				<MenuItem Command="SelectAll"/>
				<Separator/>
				<MenuItem Header="Find and Replace">
					<MenuItem Header="Find"/>
					<MenuItem Header="Replace"/>
					<MenuItem Header="Find In Files"/>
					<MenuItem Header="Replace In Files"/>
				</MenuItem>
				<Separator/>
				<MenuItem Header="Insert">
					<MenuItem Header="Sprite" IsEnabled="False"/>
					<MenuItem Header="Map" IsEnabled="False"/>
				</MenuItem>
				<MenuItem Header="Formatting">
					<MenuItem Header="Make Lowercase"/>
					<MenuItem Header="Make Uppercase"/>
					<MenuItem Header="Sentence Case"/>
					<MenuItem Header="Invert Case"/>
					<Separator/>
					<MenuItem Header="Format Document"/>
					<MenuItem Header="Convert Tabs To Spaces"/>
				</MenuItem>
				<MenuItem Header="Bookmarks">
					<MenuItem Header="Toggle Bookmark"/>
					<MenuItem Header="Next Bookmark"/>
					<MenuItem Header="Previous Bookmark"/>
				</MenuItem>
				<MenuItem Header="Goto">
					<MenuItem Header="Line"/>
					<MenuItem Header="Label"/>
				</MenuItem>
				<Separator/>
				<MenuItem Header="Preferences"/>
			</MenuItem>
			<MenuItem Header="View">
				<MenuItem Header="Toolbars">
					<MenuItem Header="Main Toolbar" IsCheckable="True"  IsChecked="{Binding Source={StaticResource Settings}, Path=Default.MainToolbar}" />
					<MenuItem Header="Debug Toolbar" IsCheckable="True"  IsChecked="{Binding Source={StaticResource Settings}, Path=Default.DebugToolbar}" />
					<MenuItem Header="Editor Toolbar"/>
					<MenuItem Header="Status Bar" IsCheckable="True"  IsChecked="{Binding Source={StaticResource Settings}, Path=Default.StatusBar}" />
				</MenuItem>
				<Separator/>
				<MenuItem Header="Label List" IsCheckable="True"  IsChecked="{Binding LabelListVisible, UpdateSourceTrigger=PropertyChanged}"/>
				<MenuItem Header="Project Viewer" IsCheckable="True"  IsChecked="{Binding ProjectViewerVisible}"/>
				<MenuItem Header="Macro Manager" IsCheckable="True"  IsChecked="{Binding MacroManagerVisible}"/>
				<Separator/>
				<MenuItem Header="Debug">
					<MenuItem Header="Breakpoint Manager"/>
					<MenuItem Header="Registers"/>
					<MenuItem Header="Call Stack"/>
					<MenuItem Header="Stack Viewer"/>
					<MenuItem Header="Variable Tracking"/>
				</MenuItem>
				<Separator/>
				<MenuItem Header="Output Window" IsCheckable="True"  IsChecked="{Binding OutputWindowVisible}"/>
				<MenuItem Header="Error List" IsCheckable="True"  IsChecked="{Binding ErrorListVisible}"/>
				<MenuItem Header="Find Results" IsCheckable="True"  IsChecked="{Binding FindResultsVisible}"/>
			</MenuItem>
			<MenuItem Header="Refactor">
				<MenuItem Header="Rename" />
				<MenuItem Header="Extract Method" />
			</MenuItem>
			<MenuItem Header="Macros" IsEnabled="False">
				<MenuItem Header="Record Temp Macro" />
				<MenuItem Header="Run Temp Macro" />
				<Separator />
				<MenuItem Header="Manage Macros" />
			</MenuItem>
			<MenuItem Header="Build">
				<MenuItem Header="Assemble" Command="wc:WabbitcodeCommands.Assemble"/>
				<MenuItem Header="Include Directories"/>
				<MenuItem Header="Build Symbol Table"/>
				<MenuItem Header="Build Listing"/>
				<MenuItem Header="Show Code Stats"/>
			</MenuItem>
			<MenuItem Header="Debug">
				<MenuItem Header="Start Debug"/>
				<MenuItem Header="Stop Debug" IsEnabled="False"/>
				<Separator/>
				<MenuItem Header="Run" IsEnabled="False"/>
				<MenuItem Header="Step" IsEnabled="False"/>
				<MenuItem Header="Step Over" IsEnabled="False"/>
				<MenuItem Header="Step Out" IsEnabled="False"/>
				<Separator/>
				<MenuItem Header="New Breakpoint">
					<MenuItem Header="Execution Breakpoint"/>
					<MenuItem Header="Data Breakpoint"/>
				</MenuItem>
				<MenuItem Header="Toggle Breakpoint"/>
				<MenuItem Header="Delete All Breakpoints"/>
				<MenuItem Header="Disable All Breakpoints"/>
			</MenuItem>
			<!--ItemsSource="{Binding Source={StaticResource dockingService}, Path=Documents}"-->
			<MenuItem Header="Window" />
			<MenuItem Header="Help">
				<MenuItem Header="Help"/>
				<MenuItem Header="Check For Updates"/>
				<MenuItem Header="About" Command="wc:WabbitcodeCommands.About"/>
			</MenuItem>
		</Menu>

		<ad:DockingManager Name="dockManager" Grid.Row="2"  Loaded="dockManager_Loaded">
			<ad:ResizingPanel Orientation="Vertical">
				<ad:ResizingPanel Orientation="Horizontal">
					<ad:DocumentPane></ad:DocumentPane>
				</ad:ResizingPanel>
			</ad:ResizingPanel>
		</ad:DockingManager>
		<ToolBarTray Grid.Row="1" Background="White">
			<ToolBar ToolBar.OverflowMode="AsNeeded" Name="MainToolBar" Visibility="{Binding Source={StaticResource Settings}, Path=Default.MainToolbar, Converter={StaticResource boolToVis}}" >
				<Button ToolTip="New" Command="New">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Main\NewDocumentHS.png" />
				</Button>
				<Button ToolTip="Open" Command="Open">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Main\OpenHS.png" />
				</Button>
				<Button ToolTip="Save" Command="Save">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Main\SaveHS.png" />
				</Button>
				<Button ToolTip="Save All" Command="wc:WabbitcodeCommands.SaveAll">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Main\SaveAllHS.png" />
				</Button>
				<Separator/>
				<Button ToolTip="Cut">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Main\CutHS.png" />
				</Button>
				<Button ToolTip="Copy">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Main\CopyHS.png" />
				</Button>
				<Button ToolTip="Paste">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Main\PasteHS.png" />
				</Button>
				<Separator/>
				<ComboBox Name="FindToolbarBox" MinWidth="150"></ComboBox>
				<Separator/>
				<Button ToolTip="Run">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Debug\PlayHS.png" />
				</Button>
				<ComboBox Name="ConfigToolbarBox" MinWidth="100"></ComboBox>
			</ToolBar>
			<ToolBar Name="DebugToolbar" Visibility="{Binding Source={StaticResource Settings}, Path=Default.DebugToolbar, Converter={StaticResource boolToVis}}">
				<Button ToolTip="Run">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Debug\PlayHS.png" />
				</Button>
				<Button ToolTip="Pause">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Debug\PauseHS.png" />
				</Button>
				<Button ToolTip="Stop">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Debug\StopHS.png" />
				</Button>
				<Button ToolTip="Restart">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Debug\RestartHS.png" />
				</Button>
				<Separator/>
				<Button ToolTip="Step">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Debug\StepHS.png" />
				</Button>
				<Button ToolTip="Step Over">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Debug\StepOverHS.png" />
				</Button>
				<Button ToolTip="Step Out">
					<Image Width="16" Height="16" Source="..\Resources\Toolbar Images\Debug\StepOutHS.png" />
				</Button>
			</ToolBar>
		</ToolBarTray>
		<wcs:WabbitcodeStatusBar x:Name="StatusBar" Background="#2C3D5A" Foreground="White" Height="26" Grid.Row="3" Visibility="{Binding Source={StaticResource Settings}, Path=Default.StatusBar, Converter={StaticResource boolToVis}}" />
	</Grid>
</Window>
